<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link th:href="@{/erp/Widget/icheck/icheck.css}" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace-ie.min.css}"/>
    <script th:src="@{/erp/js/jquery-1.9.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.admin.js}"></script>
    <script th:src="@{/erp/assets/laydate/laydate.js}" type="text/javascript"></script>
    <script th:src="@{/erp/js/lrtk.js}" type="text/javascript"></script>

    <link th:href="@{/erp/assets/css/bootstrap.min.css}" rel="stylesheet"/>
    <link rel="stylesheet" th:href="@{/erp/css/style.css}"/>
    <link th:href="@{/erp/assets/css/codemirror.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace.min.css}"/>
    <link rel="stylesheet" th:href="@{/erp/assets/css/font-awesome.min.css}"/>
    <script th:src="@{/erp/assets/js/bootstrap.min.js}"></script>
    <!-- page specific plugin scripts -->
    <script th:src="@{/erp/assets/js/jquery.dataTables.min.js}"></script>
    <script th:src="@{/erp/assets/js/jquery.dataTables.bootstrap.js}"></script>
    <script th:src="@{/erp/assets/layer/layer.js}" type="text/javascript"></script>

    <link rel="stylesheet" th:href="@{/erp/Widget/zTree/css/zTreeStyle/zTreeStyle.css}" type="text/css">
    <script th:src="@{/erp/assets/js/typeahead-bs2.min.js}"></script>
    <!-- page specific plugin scripts -->
    <script type="text/javascript" th:src="@{/erp/Widget/zTree/js/jquery.ztree.all-3.5.min.js}"></script>
    <title>货位管理</title>
</head>
<body>
<div class=" page-content clearfix">
    <div id="products_style">
        <div class="search_style">
            <form id="formData" action="/cargoSpace/cargoID_manage" method="post">
            <ul class="search_content clearfix">
                <li>
                    <label class="l_f">货架编号</label>
                    <input name="shelfNo" type="text" class="text_add" placeholder="输入货架编号" style=" width:180px"/>
                </li>
                <li>
                    <label class="l_f">货位编号</label>
                    <input name="csNo" type="text" class="text_add" placeholder="输入货位编号" style=" width:180px"/>
                </li>
                <li>
                    <label class="l_f">货位状态</label>
                    <select style="margin-left:10px;" name="csStatus">
                        <option value="" selected disabled>请选择货位状态</option>
                        <option value="1">有货</option>
                        <option value="2">无货</option>
                    </select>
                </li>
                <li style="width:90px;">
                    <button id="btn" type="button" class="btn_search"><i class="icon-search"></i>查询</button>
                </li>
            </ul>
            </form>
        </div>
        <div class="border clearfix"><span class="l_f"> <a href="javascript:;" id="property_add"
                                                           class="btn btn-warning"><i
                class="icon-plus"></i>新建货位</a> </span></div>
        <!--产品列表展示-->
        <div class="h_products_list clearfix" id="products_list">
            <div id="scrollsidebar" class="left_Treeview">
                <div class="show_btn" id="rightArrow"><span></span></div>
                <div class="widget-box side_content">
                    <div class="side_title"><a title="隐藏" class="close_btn"><span></span></a></div>
                    <div class="side_list">
                        <div class="widget-header header-color-green2">
                            <h4 class="lighter smaller">现有货架列表</h4>
                        </div>
                        <div class="widget-body">
                            <div class="widget-main padding-8">
                                <div id="treeDemo" class="ztree"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="table_menu_list" id="testIframe">
            </div>
        </div>
    </div>
</div>


<script>

    $(function () {
        $("#products_style").fix({
            float: 'left',
            //minStatue : true,
            skin: 'green',
            durationTime: false,
            spacingw: 30,//设置隐藏时的距离
            spacingh: 260,//设置显示时间距
        });
        //初始化宽度、高度
        $(".widget-box").height($(window).height() - 215);
        $(".table_menu_list").width($(window).width() - 260);
        $(".table_menu_list").height($(window).height() - 215);
        //当文档窗口发生改变时 触发
        $(window).resize(function () {
            $(".widget-box").height($(window).height() - 215);
            $(".table_menu_list").width($(window).width() - 260);
            $(".table_menu_list").height($(window).height() - 215);
        })

    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        /*******树状图*******/
        var setting = {
            async: {
                enable: true,
                url: "/warehouse/listTree"
            },
            view: {
                showLine: false,
                selectedMulti: false
            },
            data: {
                key: {
                    name: "name"//显示的字段
                }
            },
            callback: {
                onClick: onClick
            }
        };
        var t = $("#treeDemo");
        t = $.fn.zTree.init(t, setting);
        //加载右侧页面
        // ?shelfNo="+$("#shelfNo").val()
        $('#testIframe').load("/warehouse/cargoID_manage/cargoIDRightPage");

    });

    function onClick(event, treeId, treeNode, clickFlag) {
        if (treeNode.isParent) {
            $('#testIframe').load("/warehouse/cargoID_manage/cargoIDRightPage?sId=''");
        } else {
            $('#testIframe').load("/warehouse/cargoID_manage/cargoIDRightPage?sId=" + treeNode.id);
        }

    }
</script>

</body>
</html>
